home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: quick decision: is n a power of 2?
- Date: Sun, 28 Jan 96 01:11:22 GMT
- Organization: none
- Message-ID: <822791482snz@genesis.demon.co.uk>
- References: <Pine.OSF.3.91.960119114608.18779E-100000@io.UWinnipeg.ca> <4e1aeb$1gl8@cymbal.aix.calpoly.edu> <822516891snz@genesis.demon.co.uk> <4e8asi$ehg@ns.RezoNet.NET> <4ee32r$18e1@cymbal.aix.calpoly.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4ee32r$18e1@cymbal.aix.calpoly.edu>
- dstubbs@cymbal.aix.calpoly.edu "Dan Stubbs" writes:
-
- >When that data was posted it was pointed out that it was normalzed. For
- >example, the times needed by four techniques (two of them shown above) to
- >check the first 5,000,000 integers to see which of them is a power of 2
- >was 185 1,333 167 341. The difference between 167 and 185 comes from
- >the difference in how the compiler (set to its highest optimization level)
- >treated the two expressions noted above. Unfortunately, I think there is
- >a real difference.
-
- The only way to be sure is to compare the object code generated for the
- 2 cases.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-